#pragma once

#include "..\\..\\headers.default.h"

namespace image_parse
{

	class CClassInfo
	{
	public:
		string Name;
		int Label;
		int R,G,B;

	public:
		bool operator< (const CClassInfo& b);
		bool operator== (const CClassInfo& b);

		bool InputFromStream(istream& inStream);
		void OuputToStream(ostream& outStream);
	};

	class CClassInfoSet
	{
	public:
		CSimpleTypeArray<CClassInfo> ClassList;
		map<string, int> NameMap;

	public:
		bool InputFromFile(string strFN_ClassInfo);
		bool InputFromStream(istream& inStream);

		int GetLabel(string ClassName) const;
		int GetLabel(int R, int G, int B) const;
		const CClassInfo* GetClassInfo(int Label) const;
		const CClassInfo* GetClassInfo(string ClassName) const;
		const CClassInfo* GetClassInfo(int R, int G, int B) const;
	};

}

